package main.java.com.dpbird.ofbiz;

import java.util.Arrays;

public class ActionFacade {
	private String[] removedParams;
	private String returnParam;
	private boolean isReturnCollection;
	private String returnType;

	public ActionFacade(String[] removedParams, String returnParam, String returnType, boolean isReturnCollection) {
		super();
		this.removedParams = removedParams;
		this.returnParam = returnParam;
		this.isReturnCollection = isReturnCollection;
		this.returnType = returnType;
	}
	
	public String[] getRemovedParams() {
		return removedParams;
	}
	public void setRemovedParams(String[] removedParams) {
		this.removedParams = removedParams;
	}
	public String getReturnParam() {
		return returnParam;
	}
	public void setReturnParam(String returnParam) {
		this.returnParam = returnParam;
	}
	public boolean isReturnCollection() {
		return isReturnCollection;
	}
	public void setReturnCollection(boolean isReturnCollection) {
		this.isReturnCollection = isReturnCollection;
	}
	public String getReturnType() {
		return returnType;
	}
	public void setReturnType(String returnType) {
		this.returnType = returnType;
	}

	public boolean isRemovedParam(String param) {
		if (removedParams != null && removedParams.length > 0) {
			return Arrays.asList(removedParams).contains(param);
		}
		return false;
	}
}
